package com.xqt.inters.service.dict;

import java.util.List;

import com.xqt.base.entity.BaseEntity;
import com.xqt.base.page.PageInfo;
import com.xqt.entity.dict.DictBase;
import com.xqt.inters.service.base.IBaseService;

/**
 * Desc:
 * Author:liubo
 * Date: 2017-03-21 15:47
 **/
public interface IDictService extends IBaseService<DictBase>  {

    public DictBase getDictLabel(DictBase dictBase);

    public DictBase getDictName(DictBase dictBase);

    public List<DictBase> getDictList(Object dictType);

    /**
     * 获取字典类型的列表
     */

    public PageInfo<DictBase> queryTypeByList(BaseEntity page) throws Exception;

    /**
     * 字典类型添加与修改
     *
     * @param dictBase
     * @throws Exception
     */
    public void addTypeSave(DictBase dictBase, String oldDictType)
            throws Exception;

    /**
     * 字典类型删除
     *
     * @param dictBase
     * @throws Exception
     */
    public void deleteDictType(DictBase dictBase) throws Exception ;
    /**
     * 验证字典是否存在
     *
     * @param dictBase
     * @return
     */
    public List<DictBase> checkDictExist(DictBase dictBase);

    /**
     * 根据Type获取到字典类型
     *
     * @param dictBase
     * @return
     */
    public DictBase queryByType(DictBase dictBase);

    /**
     * 获取多个字典值
     *
     * @param dictBase
     * @return
     */
    public List<DictBase> getDictLabels(DictBase dictBase);
}
